﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace C1WijmoProManagement
{
    public partial class gridview : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }
            if (this.Request.UrlReferrer != null)
            {
                string preurl = this.Request.UrlReferrer.ToString();
                if (preurl.Substring(preurl.LastIndexOf("/") + 1) == "adddata.aspx")
                {
                    Session["curpage"] = "gridview.aspx";
                }
            }

            this.C1GridView1.SelectedIndex = 0;
            this.C1GridView1.GroupAreaCaption = "拖拽列头到分组栏中进行分组。";
        }

        protected void C1GridView1_RowEditing(object sender, C1.Web.Wijmo.Controls.C1GridView.C1GridViewEditEventArgs e)
        {
            for (int i = 0; i < this.C1GridView1.Columns.Count; i++)
            {
                this.C1GridView1.Columns[i].Width = 76;
            }
        }
    }
}